﻿@model dynamic
@{
   
    int imp = 0;
    var gen = ViewData.Model;
    var dir_logo = "http://"+Request.Url.Authority + "/Content/images/logo_passarini.gif";
}

<!DOCTYPE html>
<html>
<head>
<meta name="Description" content="Promocion, Cotizacion, sistema de Promociones y Ctizaciones" />
<meta name="Keywords" content="Promocion, Cotizacion, Passarini, Boletos Travel" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Distribution" content="Global" />
<meta name="Author" content="McArthur Leger - mleger45@gmail.com" />
 <title>@ViewBag.Title</title>
</head>
<body>
<img src="@dir_logo" alt="logo" width="115" height="75"/>
<br/>
<h6 style="text-align:center"><strong>@gen.promo.titulo</strong></h6>
<h6 style="color: #191919;">Fecha: @DateTime.Now.ToShortDateString()</h6>
<h6 style="color: #191919;"> Hora: @DateTime.Now.ToString("hh:mm:ss tt").Replace("PM","pm.").Replace("AM","am.")</h6>
<br/>

 @foreach (var im in gen.imagenes){
      if(im.tipo==2){ 
    <img src="@im.direccion"  width="520" height="99" alt="Red round shape"/>
      }
 }
@{ var b = new HtmlString(@Model.promo.descripcion);
                }
            @b

@if (gen.det_tarifas.Count > 0)
{
<h4>Detalles de Tarifas</h4><br/>
<table style="font-size: 8pt;width:500px;">
<thead>
<tr>
<th ><strong>Detalle:</strong></th>
<th ><strong>Tarifa</strong></th>
</tr>
</thead>
@foreach (var dt in gen.det_tarifas)
{

    if (imp % 2 != 0)
    {
        
        <tr><th>@dt.descripcion</th><td> @dt.Moneda.abreviacion @String.Format("{0:0.00}", dt.monto) </td></tr>
        
    }
    else
    {
        <tr class="odd"><th>@dt.descripcion</th><td> @dt.Moneda.abreviacion  @String.Format("{0:0.00}", dt.monto) </td></tr>
    }

    imp++;

}
</table>
}

@if(gen.imagenes.Count > 1)
{
<h4>Imagenes</h4><br/>
<table>
<tr> 
    @foreach (var im in gen.imagenes)
    {
        if (im.tipo != 2)
        { 
        <td><img src="@im.direccion"  width="50" height="50" alt="Red round shape"/></td>
        }
    }
    </tr>
</table> 
}


</body>
</html>
